<template>
  <div style="width: 942px;">
<!--    <el-breadcrumb separator-class="el-icon-arrow-right">-->
<!--      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>-->
<!--      <el-breadcrumb-item>活动管理</el-breadcrumb-item>-->
<!--      <el-breadcrumb-item>活动列表</el-breadcrumb-item>-->
<!--      <el-breadcrumb-item>活动详情</el-breadcrumb-item>-->
<!--    </el-breadcrumb>-->
<!--    <BannerImg/>-->
    <Main :listData="listData"/>
    <div class="block" style="float: right;">
      <el-pagination
          @current-change="handleCurrentChange"
          :current-page.sync="param.pageNum"
          :page-size="param.pageSize"
          layout="prev, pager, next, jumper"
          :total="total">
      </el-pagination>
    </div>
  </div>
</template>

<script>
// import BannerImg from "@/router/pages/ArticleTopics/BannerImg";
import Main from "@/router/pages/ArticleTopics/Main";
export default {
  name: "ArticleTopics",
  data(){
    return{
      total:null,
      param:{
        pageNum: 1,
        pageSize: 6
      },
      listData:[]
    }
  },
  components:{
    // BannerImg,
    Main
  },
  created() {
    this.param = {...this.param, ...this.$route.query}
    this.getRequest('/p/ams/article/articleList',this.param).then((resp)=>{
      this.listData = resp.data.list
      this.total = resp.data.total
    })
  },
  methods:{
    handleCurrentChange(val){
      this.param.pageNum = val * 1
      this.$router.push({path:'/article',query: this.param})
    }
  }
}
</script>

<style scoped>

</style>